<?
    /* -*- Mode: PHP5; tab-width: 4; indent-tabs-mode: nil; basic-offset: 4 -*- */
    
    /*********************************************************
    *            --== InArch ==--
    *
    * @author Thomas Brandstätter <tb.essentialmind.com>
    * @version n/a
    * @copyright essentialmind.com 2010
    *
    *********************************************************/

    /***
    * class ajaxGetGroupInfo
    ****
    * This class will return user information
    ****
    * @package ajax
    * @author Thomas Brandstätter <tb.essentialmind.com>
    * @version n/a
    * @copyright essentialmind.com 2010
    ***/
    class ajaxChangeSiteOrderPos extends ajaxAction{

        function process(){
	
			try{
                //update order_pos
				if ($GLOBALS['_CONFIG']['enable_order_position']) {
                	$this->db->Execute("UPDATE pagemap SET order_pos = " . (int)$_REQUEST['position'] . "   WHERE id = ".(int)$_REQUEST['node_id']);
				}
                $this->r->node_type = $_REQUEST['node_type'];
                $this->r->node_id = $_REQUEST['node_id'];
                $this->r->position = $_REQUEST['position'];
                
            //something went wrong
            }catch(exception $e){
                //log error
                $this->log->recordError($e->getMessage());

                //do nothing
            }
			
        }
    }
?>